<%-- 
    Document   : obtener-folios-documento
    Created on : 21/09/2010, 10:01:00 AM
    Author     : Eduardo
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.util.*" %>
<%@page import="pe.gob.pnp.digitalizar.beans.*" %>
<%@page import="pe.gob.pnp.digitalizar.despachadores.*" %>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%
    int idDocumento = Integer.parseInt(request.getParameter("id"));
    List<FolioBean> folios = DocumentoDespachador.obtenerFoliosPorIdDocumento(idDocumento);
    pageContext.setAttribute("folios", folios);
%>
{
    folios:
    [
    <c:forEach var="folio" items="${folios}" varStatus="estado">
        ${estado.index>0 ? "," : ""}
        {
            id: ${folio.id}
        }
    </c:forEach>
    ]
}